import 'package:flutter/material.dart';

class ButtonItem extends StatelessWidget {
  ButtonItem({Key key, this.text, this.onTap}) : super(key: key);

  final String text;
  final Function onTap;

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      child: Container(
        height: 35,
        decoration: BoxDecoration(
            color: Color.fromRGBO(239, 239, 243, 1),
            borderRadius: BorderRadius.circular(3)),
        padding: EdgeInsets.fromLTRB(8, 6, 8, 6),
        child: Container(
          child: Text(this.text),
        ),
      ),
      onTap: () {
        onTap();
      },
    );
  }
}
